﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GameEngine.View.Components;
using GameEngine.Model;

namespace MySettlers.View.Components.editor
{
    public partial class EditorPreSettingsUC : UserControl, IMenuView<string>
    {
        public event OnButtonClickHandler<string> OnExternalActionButtonClick;

        public const string BACKBUTTON = "BACKBUTTON";
        public const string NEXTBUTTON = "NEXTBUTTON";
        IGameDataProxy<int> gameDataProxy;

        public EditorPreSettingsUC()
        {
            InitializeComponent();
            BackButton.Tag = BACKBUTTON;
            NextButton.Tag = NEXTBUTTON;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button b = (Button)sender;
            OnExternalActionButtonClick(b.Tag as string);
        }

        public String GameName {
            get { return NameTextBox.Text; }
            set { NameTextBox.Text = value; }
        }

        public String MapWidth {
            get { return WidthTextBox.Text; }
            set { WidthTextBox.Text = value; }
        }

        public String MapHeight
        {
            get { return HeightTextBox.Text; }
            set { HeightTextBox.Text = value; }
        }
    }
}
